package com.kit.data.kitopeso.adapter;

import android.annotation.SuppressLint;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.kit.data.kitopeso.base.BaseBindingAdapter1;
import com.kit.data.kitopeso.databinding.KitoFbOnlineItem3ItemBinding;
import com.kit.data.kitopeso.tools.ViewUtils;


import java.util.List;

public class ChatItemAdapter extends BaseBindingAdapter1<String, KitoFbOnlineItem3ItemBinding> {


    public ChatItemAdapter(List<String> dataList) {
        super(dataList);
    }

    @SuppressLint("SetTextI18n")
    @Override
    protected void bindData(KitoFbOnlineItem3ItemBinding binding, String item, int position) {
        binding.tvTitle.setText(item);
        binding.tvTitle.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            if (onBtnItemClickListener != null) {
                onBtnItemClickListener.onItemClick(position);
            }
        });
    }

    @Override
    protected int getItemType(String item) {
        return 0;
    }

    @Override
    protected KitoFbOnlineItem3ItemBinding createBinding(LayoutInflater inflater, ViewGroup parent, int viewType) {
        return KitoFbOnlineItem3ItemBinding.inflate(inflater, parent, false);
    }

}
